package com.wondersgroup.retrofittest;

import android.app.Application;

import com.anupcowkur.reservoir.Reservoir;
import com.hss.rxjava.ApiManager;

import java.io.IOException;
import java.io.InputStream;

/**
 * Created by Administrator on 2017/2/9.
 */

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        InputStream ins = getApplicationContext().getResources().openRawResource(R.raw.serveryfytest);
        ApiManager.getInstance().init(ins, "111111");
        if (ins != null) {
            try {
                ins.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }


        try {
            Reservoir.init(this, 2048); //in bytes
        } catch (Exception e) {
            //failure
        }
    }
}
